<%@ page language="java" pageEncoding="UTF-8" buffer="16kb"%>
<%@ include file="/base.jsp"%>
<%@ include file="/module/taglibs.jsp"%>
<%@ include file="/module/nocache.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<%@ include file="/module/js.jsp"%>
<%@ include file="/module/orderField.jsp"%>
<style>
table label.error {
    margin-left: 5px;
    width: auto;
    display: inline;
    color: red;
}


</style>
</head>
<body>
     <form action="#" name="Form" id="Form" method="post">
            <input type="hidden" name="jyId" id="jyId"  value="${entity.jyId}"/>
            <input type="hidden" id="reId" name="reId" value="${reId}"/>
	     		<table cellpadding="0" cellspacing="0" border="0" class="table-border" width="95%">
			<tr>
				<td class="table-header" colspan="6">结业申请</td>
			</tr>
		<tr>
				<td class="table-titleTD" style="width:15%;">姓名</td>
				<td class="table-contentTD" style="width:35%;">${entity.xm}</td>
		
			    <td class="table-titleTD" >工号：</td>
				<td class="table-contentTD">${entity.zgh}</td>
			</tr>
			
			<tr>
				<td class="table-titleTD" >部门：</td>
				<td class="table-contentTD">${entity.ksMc}</td>
			
				<td class="table-titleTD" >教研组：</td>
				<td class="table-contentTD">${entity.jyzMc} </td>
			</tr>
			 <tr>
				<td class="table-titleTD" >结业开始日期：</td>
				<td class="table-contentTD">${entity.ksRq}</td>
				
				<td class="table-titleTD" >结业结束日期：</td>
				<td class="table-contentTD">${entity.jsRq}</td>
			</tr>
			
			 <tr>
				<td class="table-titleTD" >学分结构：</td>
				<td class="table-contentTD">${entity.xfJg}</td>
				
				<td class="table-titleTD" >总有效学分：</td>
				<td class="table-contentTD">${entity.zyxXf}</td>
			</tr>
			
		     <tr>
				<td class="table-titleTD" >状态：</td>
				<td class="table-contentTD">${entity.statesDes}</td>
									
				<td class="table-titleTD" >申请时间：</td>
				<td class="table-contentTD">
				 <fmt:parseDate value="${entity.createTime}" pattern="yyyy-MM-dd" var="masterDate"/>
                 <fmt:formatDate value="${masterDate}" pattern="yyyy-MM-dd" />
				</td>
			</tr>
			
			<tr>
				<td class="table-titleTD">附件：</td>
				<td class="table-contentTD" colspan="3">
					<table>
						<tr>
							<td colspan="2">
								<div id="uploadadd"></div>
							</td>
						</tr>
						<c:if test="${fn:length(dataList) > 0}">
							<c:forEach items="${dataList}" var="datalist" varStatus="index">
								<tr>
									<td>
										 [文件] ${datalist.fileName}
									</td>
									<td>
										<a href="${basePath}/DownLoadFileServlet?filename=${datalist.fileName}&filepath=${datalist.filePath}">下载</a>
									</td>
								</tr>
							</c:forEach>
						</c:if>
					</table>
				</td>
			</tr>
			<tr>
				<td class="table-titleTD">备注：</td>
				<td class="table-contentTD" colspan="3"><!-- <textarea rows="8" cols="150" name="remark"  placeholder="备注" id="remark" maxlength="2000" > -->${entity.remark}<!-- </textarea> --></td>
			</tr>
		</table>
		<br />
		
	    <c:if test="${entity.states!=0}">
	     <br />
		<table cellpadding="0" cellspacing="0" border="0" class="table-border" width="100%">
			   <c:if test="${checkFlag==1}">
						<tr>
							<td class="table-titleTD">审批意见：</td>
							<td class="table-contentTD" colspan="5" style="border: 0;"><input type="text" id="spyj" name="spyj" value="" class="inputText" style="width: 50%"/>&nbsp;&nbsp;	审批结果：
							<input type="radio" id="states" name="states" value="3" checked="checked"/>审核通过&nbsp;&nbsp;
							<input type="radio" id="states" name="states" value="1"/>拒绝&nbsp;&nbsp;
							<input type="button" id="btnSave"   class="inputButton" style="text-align: center;" value="完成审批" />&nbsp;&nbsp;
						    <input type="button" id="returnBut" autocomplete="off"  class="inputButton"value="返回" style="text-align: center;" />
							</td>
						</tr>
				</c:if>
				<tr>
					<td class="table-titleTD" style="text-align: center;">序号</td>
					<td class="table-titleTD" style="text-align: center;">审批人</td>
					<td class="table-titleTD"  style="text-align: center;">审批步骤</td>
					<td class="table-titleTD" style="text-align: center;">审批结果</td>
					<td class="table-titleTD" style="text-align: center;">审批时间</td>
					<td class="table-titleTD" style="text-align: center;">审批意见</td>
				</tr>
			<c:forEach items="${chekResultList}" var="res" varStatus="status">
				<tr>
					<td class="table-contentTD" style="text-align: center;">${status.index+1}</td>
					<td class="table-contentTD" style="text-align: center;">${res.userName}</td>
					<td class="table-contentTD"  style="text-align: center;">${res.stepName}</td>
					<td class="table-contentTD" style="text-align: center;">${res.userState}</td>
					<td class="table-contentTD" style="text-align: center;">${res.approvalTime}</td>
					<td class="table-contentTD" style="text-align: center;">${res.comments}</td>
				</tr>
			</c:forEach>
	     </table>
	   </c:if>
	   
	     <br/>
	  		<c:if test="${checkFlag==0}">
				<table cellpadding="0" cellspacing="0" border="0" align="left">
					<tr>
						 <td><input type="button" id="returnBut" autocomplete="off"  class="inputButton"value="返回" style="text-align: center;" /></td>
					</tr>
				</table>
			</c:if>
	   
	  </form>
	<script>
		 
			$(document).ready(function() {
				//保存
				$("#btnSave").click(function() {
					            $("#btnSave").attr("disabled",true);
								  layer.confirm("您是否确定审核吗?",{icon : 3,title : '提示',skin : 'layer-ext-moon'},function(index) {
										document.Form.action = "${basePath}/windUpStudy/audit";
										document.Form.submit();	 
								   },function(index) {
									    layer.close(index);
									    $("#btnSave").attr("disabled",false);
									});	
										
				 });
				
				  $("#returnBut").click(function() {
		 		 	  window.location.href='${basePath}/windUpStudy/index_manage';
		 		  });
			});
			
		</script>

</body>
</html>
